<template>
	<view>
		<!-- 分段器 -->
		<zy-segmented :values="items" :current="current" @onClickItem="onClickItem" />
		<!-- “已设置工序”组件 -->
		<set v-if="current === 0" />
		<!-- “添加工序”组件 -->
		<add v-if="current === 1" />
	</view>
</template>

<script>
	import add from './components/add.vue'
	import set from './components/set.vue'
	export default {
		components: {
			add,
			set,
		},
		data() {
			return {
				items: [this.$t('my.procedure.settedProcedure'), this.$t('my.procedure.addProcedure')], //分段器名称
				current: 0, //分段器默认初始值
			}
		},
		methods: {
			// 分段器选项发生改变时触发
			onClickItem(e) {
				this.current = e
			},
		}
	}
</script>
<style lang="scss" scoped>
</style>